<!DOCTYPE html>
<html>
<head>
    <title>设备ICC代码维护</title>
    #parse("sys/header.html")
    <style>
        .ui-jqgrid {
            width: 84%;
            float: right;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row ::gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.devCode" @on-enter="query" placeholder="设备编码"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("devcodeicc:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("devcodeicc:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("devcodeicc:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <div style="height: 85vh;width:15%;overflow:auto;float:left;">
            <p class="text-center" style="font-size: 15px;">仓库</p>
            <div id="storeLayer">
                <ul id="storeTree" class="ztree"></ul>
            </div>
        </div>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="devCodeIcc" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="设备编码" prop="devCode">
                        <i-input v-model="devCodeIcc.devCode" placeholder="设备编码" readonly ></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="设备名称" prop="devName">
                        <i-input v-model="devCodeIcc.devName" placeholder="设备名称" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="生产线" prop="proLineName">
                        <i-input type="text" v-model="devCodeIcc.proLineName" icon="md-arrow-dropdown-circle"  readonly="readonly"
                                 @on-click="deptTree" readonly="readonly" placeholder="生产线"></i-input>
                        <!--<i-input v-model="devCodeIcc.proLineName" placeholder="生产线"/>-->
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="ICC代码" prop="iccCode">
                        <i-input v-model="devCodeIcc.iccCode" placeholder="ICC代码"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="22">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="devCodeIcc.remark" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>

            <!--<Form-item label="生产线ID" prop="proLineId">
                <i-input v-model="devCodeIcc.proLineId" placeholder="生产线ID"/>
            </Form-item>
            <Form-item label="车间ID" prop="workshopId">
                <i-input v-model="devCodeIcc.workshopId" placeholder="车间ID"/>
            </Form-item>
            <Form-item label="车间" prop="workshopName">
                <i-input v-model="devCodeIcc.workshopName" placeholder="车间"/>
            </Form-item>
            <Form-item label="设备ID" prop="devId">
                <i-input v-model="devCodeIcc.devId" placeholder="设备ID"/>
            </Form-item>
            <Form-item label="修改时间" prop="updateDate">
                <i-input v-model="devCodeIcc.updateDate" placeholder="修改时间"/>
            </Form-item>
            <Form-item label="修改人" prop="updateUser">
                <i-input v-model="devCodeIcc.updateUser" placeholder="修改人"/>
            </Form-item>
            <Form-item label="创建人" prop="createUser">
                <i-input v-model="devCodeIcc.createUser" placeholder="创建人"/>
            </Form-item>
            <Form-item label="创建时间" prop="createDate">
                <i-input v-model="devCodeIcc.createDate" placeholder="创建时间"/>
            </Form-item>-->
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>
<div id="categoryLayer" style="display: none;padding:10px;">
    <ul id="categoryTree" class="ztree"></ul>
</div>
<script src="${rc.contextPath}/js/device/devcodeicc.js?_${date.systemTime}"></script>
</body>
</html>
